package models.sys;

import com.alibaba.fastjson.JSONObject;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by zqx on 16/5/19.
 */
@Entity
@Table(name="tb_admin_menu")
public class AdminMenu extends BaseSystemModel {

    public String menuname;
    public String menuurl;
    public String icon;
    public Long parent;

    @Column(columnDefinition="INT default 0")
    public Integer sortid;

    public JSONObject getMenuData() {
        JSONObject data = new JSONObject();
        data.put("menuid", this.id);
        data.put("menuname", this.menuname);
        data.put("menuurl", this.menuurl);
        data.put("parent", this.parent);
        data.put("icon", this.icon);
        return data;
    }
}
